# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=ddnrs
pkgver=0.3.0
pkgrel=0
pkgdesc="A simple tool to update dns records to match your current IP"
url="https://codeberg.org/Kladky/ddnrs"
arch="all"
license="AGPL-3.0-only"
makedepends="
	make
	cargo
	cargo-auditable
	openssl-dev
	"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/Kladky/ddnrs/archive/$pkgver.tar.gz"
options="!check" # no tests
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	CARGO="cargo auditable" make build-frozen
}

package() {
	DESTDIR="$pkgdir" make install
	DESTDIR="$pkgdir" make install-openrc
}

sha512sums="
6ec533aec272bf826f572a67673f67292ee174816e2406934604cc20bf129a47708dea7f69f58c65c0f2125b8f07e5f4f68b47a918592d7c2e3d3225f0bbafd1  ddnrs-0.3.0.tar.gz
"
